#include<bits/stdc++.h>
using namespace std;
const int maxn = 1e6+9;
const int MOD = 1e9+7;
int dp[maxn];
int solve() {
  dp[0] = 1;
  int n;cin>>n;
  for(int i=0; i<maxn;++i) {
    if(!dp[i])continue;
    for(auto dice:{1,2,3,4,5,6}) {
      (dp[i+dice] += dp[i]) %= MOD;
    }
  }
  cout << dp[n] << endl;
  return 0;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0); cout.tie(0);
  // freopen("in.txt","r",stdin);
  // freopen("out.txt","w",stdout);
  int tc; tc = 1;
  for(int t = 1; t <= tc; t++) {
    // cout << "Case #" << t << ": "
    solve();
  }
  return 0;
}
